package cn.edu.imau.zy.student.service.impl;

import java.util.List;

import cn.edu.imau.zy.student.mapper.StStudentFamilyMapper;
import cn.edu.imau.zy.student.service.IStStudentFamilyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.edu.imau.zy.common.core.entity.student.StStudentFamily;
import cn.edu.imau.zy.common.core.text.Convert;

/**
 * 家庭成员情况Service业务层处理
 *
 * @author wyz
 * @date 2020-10-26
 */
@Service
public class StStudentFamilyServiceImpl implements IStStudentFamilyService {
    @Autowired
    private StStudentFamilyMapper stStudentFamilyMapper;

    /**
     * 查询家庭成员情况
     *
     * @param id 家庭成员情况ID
     * @return 家庭成员情况
     */
    @Override
    public StStudentFamily selectStStudentFamilyById(String id) {
        return stStudentFamilyMapper.selectStStudentFamilyById(id);
    }

    /**
     * 查询家庭成员情况列表
     *
     * @param stStudentFamily 家庭成员情况
     * @return 家庭成员情况
     */
    @Override
    public List<StStudentFamily> selectStStudentFamilyList(StStudentFamily stStudentFamily) {
        return stStudentFamilyMapper.selectStStudentFamilyList(stStudentFamily);
    }

    /**
     * 新增家庭成员情况
     *
     * @param stStudentFamily 家庭成员情况
     * @return 结果
     */
    @Override
    public int insertStStudentFamily(StStudentFamily stStudentFamily) {
        return stStudentFamilyMapper.insertStStudentFamily(stStudentFamily);
    }

    /**
     * 修改家庭成员情况
     *
     * @param stStudentFamily 家庭成员情况
     * @return 结果
     */
    @Override
    public int updateStStudentFamily(StStudentFamily stStudentFamily) {
        return stStudentFamilyMapper.updateStStudentFamily(stStudentFamily);
    }

    /**
     * 删除家庭成员情况对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStStudentFamilyByIds(String ids) {
        return stStudentFamilyMapper.deleteStStudentFamilyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除家庭成员情况信息
     *
     * @param id 家庭成员情况ID
     * @return 结果
     */
    @Override
    public int deleteStStudentFamilyById(String id) {
        return stStudentFamilyMapper.deleteStStudentFamilyById(id);
    }
}
